home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 January / PCWorld_2002-01_cd.bin / Novinky / Becher / 1. Zlaty Kalich / ZlatyKalich.exe / scripts / DefineButton2_864 / BUTTONCONDACTION on(release).as next >
Text File  |  2001-11-12  |  791b  |  35 lines

  1. on(release){
  2.    x = Math.round(this._x / 45) - 1;
  3.    if(_root.draglej == _root.itembar[x])
  4.    {
  5.       stopDrag();
  6.       _root.draglej = 0;
  7.       _root.itembar_refresh();
  8.    }
  9.    else if(_root.draglej == 0)
  10.    {
  11.       if(_root.itembar[x] == 10)
  12.       {
  13.          _root.itembar[x] = 11;
  14.          _root.itembar_refresh();
  15.       }
  16.       else
  17.       {
  18.          startDrag("_root.i" add _root.itembar[x],0);
  19.          _root.draglej = _root.itembar[x];
  20.       }
  21.    }
  22.    else if(_root.draglej == 3 && _root.itembar[x] == 4)
  23.    {
  24.       _root.draglej = 0;
  25.       _root.itembar[x] = 5;
  26.       _root.itembar_remove(3);
  27.    }
  28.    else if(_root.draglej == 4 && _root.itembar[x] == 3)
  29.    {
  30.       _root.draglej = 0;
  31.       _root.itembar[x] = 5;
  32.       _root.itembar_remove(4);
  33.    }
  34. }
  35.